package Boundry;

import javax.swing.JPanel;

import Boundry.GenericTools.IPanelOperation;
import Boundry.GenericTools.InputPanel;
import Controllers.GenericToolsForController.BrowseScreen;

import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.ImageIcon;

public class EvluationScreenGUI extends InputPanel implements ActionListener, IPanelOperation {
	private JTextField textFieldFile;
	private JButton btnBrowse;
	private BrowseScreen bs;
	/**
	 * Create the panel.
	 */
	
	public static void main(String[] args)
	{
		JFrame frame = new JFrame();
		frame.getContentPane().add(new EvluationScreenGUI());
		frame.setVisible(true);
		frame.setBounds(400, 400, 400, 400);
		frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
	}
	
	public EvluationScreenGUI() {
		bs = new BrowseScreen();
		JLabel lblEvluationReport = new JLabel("Evaluation Report");
		lblEvluationReport.setFont(new Font("Tahoma", Font.PLAIN, 18));
		lblEvluationReport.setBounds(255, 52, 181, 37);
		mainPanel.add(lblEvluationReport);
		
		JLabel lblFile = new JLabel("File:");
		lblFile.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblFile.setBounds(176, 105, 71, 29);
		mainPanel.add(lblFile);
		
		textFieldFile = new JTextField();
		textFieldFile.setBounds(227, 111, 209, 20);
		mainPanel.add(textFieldFile);
		textFieldFile.setColumns(10);
		
		btnBrowse = new JButton("");
		btnBrowse.setIcon(new ImageIcon(EvluationScreenGUI.class.getResource("/ICONS/4_collections_collection.png")));
		btnBrowse.setBounds(462, 109, 105, 30);
		btnBrowse.addActionListener(this);
		mainPanel.add(btnBrowse);
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon(EvluationScreenGUI.class.getResource("/ICONS/5_content_paste.png")));
		label.setBounds(194, 52, 32, 37);
		mainPanel.add(label);

	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		bs.ChooseFile();
		textFieldFile.setText( bs.getPath());
	}
	
	
	public BrowseScreen getBrowseScreen()
	{
		return this.bs;
	}

	@Override
	public String apHelpButton() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String setTitle() {
		
		return "";
	}
	
	
}
